Clock Component Functions
This section describes the functions that are provided by clock components. These functions are described from the perspective of the Movie Toolbox, the entity that is most likely to call clock components. If you are developing a clock component, your component must behave as described here.This section has been divided into the following topics:
If you are developing an application that uses clock components, you should read the next section, "Getting the Current Time."
- "Getting the Current Time" describes the function that allows the Movie Toolbox to obtain the current time from a clock component.
- "Using the Callback Functions" discusses the functions that allow clock components to help applications define and schedule time base callback functions.
- "Managing the Time" describes functions that help clock components manage their time correctly.
If you are developing a clock component, you need to be familiar with all the functions described in this section.
You can use the following constants to refer to the request codes for each of the functions that your clock component must support:
- Note
- Your application can call any clock component function at
interrupt time, except for theClockNewCallBack
andClockDisposeCallBack
functions (described on page 11-9 and page 11-13, respectively). In addition, your application should not call the Component Manager'sOpenComponent
andCloseComponent
functions at interrupt time.![]()
/* constants to refer to request codes for supported functions */ enum { kClockGetTimeSelect = 0x1,/* ClockGetTime */ kClockNewCallBackSelect = 0x2,/* ClockNewCallBack */ kClockDisposeCallBackSelect = 0x3,/* ClockDisposeCallBack */ kClockCallMeWhenSelect = 0x4,/* ClockCallMeWhen */ kClockCancelCallBackSelect = 0x5,/* ClockCancelCallBack */ kClockRateChangedSelect = 0x6,/* ClockRateChanged */ kClockTimeChangedSelect = 0x7,/* ClockTimeChanged */ kClockSetTimeBaseSelect = 0x8,/* ClockSetTimeBase */ kClockStartStopChangedSelect = 0x9,/* ClockStartStopChanged */ kClockGetRateSelect = 0xA /* ClockGetRate */ };
Subtopics
- Getting the Current Time
- Using the Callback Functions
- Managing the Time
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help